# Contributor: Robin Candau <robincandau@protonmail.com>
# Maintainer: Robin Candau <robincandau@protonmail.com>
pkgname=nwg-panel
pkgver=0.9.50
pkgrel=0
pkgdesc="GTK3-based panel for sway and Hyprland Wayland compositors"
url="https://github.com/nwg-piotr/nwg-panel"
arch="noarch"
license="MIT"
depends="python3 py3-gobject3 py3-i3ipc py3-cairo py3-dasbus py3-netifaces py3-psutil py3-requests bluez-btmgmt brightnessctl"
makedepends="py3-gpep517 py3-build py3-installer py3-wheel py3-setuptools gtk+3.0-dev libayatana-appindicator-dev gtk-layer-shell-dev glib-dev playerctl-dev"
subpackages="$pkgname-doc $pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/nwg-piotr/nwg-panel/archive/v$pkgver.tar.gz"
options="!check" # no test suite

build() {
	gpep517 build-wheel --wheel-dir .dist --output-fd 3 3>&1 >&2
}

package() {
	gpep517 install-wheel --destdir "$pkgdir" .dist/*.whl

	install -Dm 644 "$pkgname.svg" "$pkgdir/usr/share/pixmaps/$pkgname.svg"
	install -Dm 644 nwg-shell.svg "$pkgdir/usr/share/pixmaps/nwg-shell.svg"
	install -Dm 644 nwg-processes.svg "$pkgdir/usr/share/pixmaps/nwg-processes.svg"
	install -Dm 644 "$pkgname-config.desktop" "$pkgdir/usr/share/applications/$pkgname-config.desktop"
	install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
	install -Dm 644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
}

sha512sums="
064d6a638227fa1a458de4d1073557fafebb55703f03f62beb068c41f89be3a6193c7ff3aee516793bf7d80d775b1921ce865268f1c0bbfb28ed23e31acfee90  nwg-panel-0.9.50.tar.gz
"
